@home.main(""){

  <div class="row">
    <div class="form-group" align="center">


      <div style="width: 1000px;
        margin-top: 40px">

        <div class="col-sm-12">

        <div class="panel panel-default">
          <div class="panel-heading" style="background-image: linear-gradient(to bottom, #B61010 0, #B61010 100%);
            color: white">
            <h3 class="panel-title">填写收货信息</h3>
          </div>
          <div class="panel-body">
            <form class="form-horizontal" id="form" accept-charset="UTF-8" method="get" action="/english/Search/searchBefore">
              <div class="form-group col-sm-12">
                <label class="control-label col-sm-2">卡券号码:</label>
                <div class="col-sm-4">
                  <input type="text" style="float: left;
                    height: 40px;" class="form-control" name="code" id="code">
                </div>
              </div>

              <div class="form-group col-sm-12">
                <label class="control-label col-sm-2">卡券有效期:</label>
                <div class="col-sm-4">
                  <input type="text" style="float: left;
                    height: 40px;" disabled="disabled" class="form-control" name="password" id="password">
                </div>
              </div>

              <div class="form-group col-sm-12">
                <label class="control-label col-sm-2">收货人姓名:</label>
                <div class="col-sm-4">
                  <input type="text" style="float: left;
                    height: 40px;" class="form-control" name="vcode" id="vcode">
                </div>
              </div>

              <div class="form-group col-sm-12">
                <label class="control-label col-sm-2">收货人手机号码:</label>
                <div class="col-sm-4">
                  <input type="text" style="float: left;
                    height: 40px;" class="form-control" name="vcode" id="vcode">
                </div>
              </div>

              <div class="form-group col-sm-12">
                <label class="control-label col-sm-2">备用电话:</label>
                <div class="col-sm-4">
                  <input type="text" style="float: left;
                    height: 40px;" class="form-control" name="vcode" id="vcode">
                </div>
              </div>

              <div class="form-group col-sm-12">
                <label class="control-label col-sm-2">收货地区:</label>
                <div class="col-sm-3">
                  <select name="sheng" id="sheng" class="form-control" onchange="changeSheng(this)"></select>
                </div>
                <div class="col-sm-3">
                  <select name="shi" id="shi" class="form-control" onchange="changeShi(this)"></select>
                </div>
                <div class="col-sm-3">
                  <select name="xian" id="xian" class="form-control"></select>
                </div>
              </div>

              <div class="form-group col-sm-12">
                <label class="control-label col-sm-2">具体地址:</label>
                <div class="col-sm-6">
                  <input type="text" style="float: left;
                    height: 40px;" class="form-control" name="vcode" id="vcode" placeholder="温馨提示：因地址不详导致无法配送，造成损失概不负责。">
                </div>
              </div>

              <div class="form-group col-sm-12">
                <label class="control-label col-sm-2">发货日期:</label>
                <div class="col-sm-4">
                  <input type="date" style="float: left;
                    height: 40px;" class="form-control" name="vcode" id="vcode">
                </div>
                <div style="text-align: left">
                  <i>正常情况下一线城市隔日送达,其他地区延迟1-2天送达,提示:对于鲜活物品,成功预约后请保持手机畅通留人签收。</i>
                </div>
              </div>


              <div class="col-sm-offset-3 col-sm-3" style="margin-top: 20px">
                <button type="button" onclick="pickUp()" class="btn" style="color: white;
                  background-color: #B61010;
                  width: 180px;
                  height: 40px;
                  font-size: 18px;">确认提交</button>
              </div>
            </form>
          </div>
        </div>
        </div>
      </div>
    </div>
  </div>


  <script>


    $(function () {

        $.ajax({
          url:"@routes.HomeController.getAllAddress()",
          type:"post",
          success:function (data) {
            $("#sheng").select2({
              data:data.sheng
            });
            $("#shi").select2({data:data.shi});
            $("#xian").select2({data:data.xian});
          }
        })
    })


    function changeSheng(obj) {
        var sheng = obj.value;
        $.ajax({
          url:"/order/getBySheng?sheng=" + sheng,
          type:"post",
          success:function (data) {
            $("#shi").empty().select2({data:data.shi});
            $("#xian").empty().select2({data:data.xian});
          }
        })
    }

    function changeShi(obj) {
      var shi = obj.value;
      $.ajax({
        url:"/order/getByShi?shi=" + shi,
        type:"post",
        success:function (data) {
          $("#xian").empty().select2({data:data.xian});
        }
      })
    }


  </script>



}